-- GENERATED SPELL FOR [Arkkoran Oracle] --


function spell0_6138(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_6138', 3000, 1)
end

function spell1_6138(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6138', 0, 1)
end

function spell2_6138(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(11824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6138', 0, 1)
end

function Sorts_6138(pUnit, Event)
local choix_sorts_6138 = math.random(0, 2)
if choix_sorts_6138 == 0 then
pUnit:RegisterEvent('spell0_6138', 1, 1)
end
if choix_sorts_6138 == 1 then
pUnit:RegisterEvent('spell1_6138', 1, 1)
end
if choix_sorts_6138 == 2 then
pUnit:RegisterEvent('spell2_6138', 1, 1)
end
end

function mob6138_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6138', math.random(1500, 3000), 1)
end

function mob6138_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6138_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6138_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6138, 1, 'mob6138_Action')
RegisterUnitEvent(6138, 2, 'mob6138_Leave')
RegisterUnitEvent(6138, 3, 'mob6138_Kill')
RegisterUnitEvent(6138, 4, 'mob6138_Die')
